/* eslint-disable no-debugger */
import React from 'react'
import * as Icon from '@ant-design/icons'

function ButtonIcon(props) {
  const { iconType, size = '16px' } = props
  if (iconType && Icon[iconType]) {
    return React.createElement(Icon[iconType], {
      style: { fontSize: size },
    })
  }
  return null
}

export default ButtonIcon
